package year2021.month01;

import java.util.Calendar;
import java.util.Date;

public class DateTest {

    public static void main(String[] args){
        try {
            Date now = new Date();

            Calendar calendar = Calendar.getInstance();
            calendar.setTime(now);
            calendar.add(Calendar.MONTH, -1);

            Date d1 = calendar.getTime();
            calendar.add(Calendar.MONTH, -1);
            Date d2 = calendar.getTime();

            System.out.println();
        } catch (Exception e){
            System.out.println(e.getMessage());
        }
    }

}
